using OracleInternal.Common;

namespace OracleInternal.MTS
{
	internal class MTSTxnRMCache
	{
		private static SyncQueueList<MTSTxnRM> m_CCPTxnRMs = new SyncQueueList<MTSTxnRM>();

		internal static MTSTxnRM GetRM(bool bIsCCP)
		{
			MTSTxnRM t = null;
			if (!m_CCPTxnRMs.Dequeue(out t))
			{
				t = new CCPMTSTxnRM();
			}
			return t;
		}

		internal static void PutRM(MTSTxnRM txnRM)
		{
			m_CCPTxnRMs.AddIfNotExist(txnRM);
		}
	}
}
